<style>
    #images_editor {
        width: 1024px;
    }
</style>

<div id="images_editor" class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">&times;</button>
            <h4 class="modal-title">Images Manager</h4>
            <p>Upload and assign images to members and visitors</p>
        </div>
        <div class="modal-body">
            <section id="image_manager">
                <div class="row">
                    <div class="pull-right" style="display: none;">

                        <div style="display: none">
                            <input type="file" value="Choose Image" name="uploadfile" id="img-upload" multiple="multiple" />
                            <iframe src="" height="1" width="1" name="img-frame" id="img-frame" style="position: absolute; left: -9999px"></iframe>
                            <input type="hidden" id="img-upload-url" value="<?php echo $this->Html->url(array('controller' => 'images', 'action' => 'upload')); ?>" />
                        </div>
                    </div>

                </div>

                <div class='row' id="images-list">
                    <ul id="images">
                        <?php foreach ($untagged as $image) { ?>
                            <li class="image-item" data-image-id="<?php echo $image['MemberImage']['id']; ?>" style="background-image: url(<?php echo $this->Html->url($image['MemberImage']['file_path']); ?>);">
                                <a href="#" class="closer"><i class="fa fa-times"></i></a>

                                <div class="tag_area">
                                    <input type="text" class="tag_list input input-medium" placeholder="Who is this?" data-url="<?php echo $this->Html->url(array('controller' => 'images', 'action' => 'tag_list')); ?>" />
                                    <a href="#" class="tag_remove"><i class="fa fa-times"></i></a>
                                </div>
                            </li>
                        <?php } ?>
                    </ul>

                </div>

                <div class="images-nav"></div>
            </section>
        </div>
        
        <div class="modal-footer">
            <a href='#' class="btn pull-left btn-info" id="upload-btn"><i class="fa fa-upload"></i> Upload Images</a>
            
            <a href="#" class="btn btn-primary" id="save_apply"><i class="fa fa-save"></i> Save & Assign</a>
            <a href="#" class="btn btn-white" data-dismiss="modal">Close</a>
        </div>
    </div> 
</div>